﻿CREATE VIEW [maint].[JobStepDetails]
AS
SELECT
			job.[name]
			,stp.[step_id]
			,stp.[step_name]
			,stp.[subsystem]
			,stp.[command]
			,stp.[flags]
			,stp.[additional_parameters]
			,stp.[cmdexec_success_code]
			,stp.[on_success_action]
			,stp.[on_success_step_id]
			,stp.[on_fail_action]
			,stp.[on_fail_step_id]
			,stp.[server]
			,stp.[database_name]
			,stp.[database_user_name]
			,stp.[retry_attempts]
			,stp.[retry_interval]
			,stp.[os_run_priority]
			,stp.[output_file_name]
			,stp.[last_run_outcome]
			,stp.[last_run_duration]
			,stp.[last_run_retries]
			,stp.[last_run_date]
			,stp.[last_run_time]
			,stp.[proxy_id]
			,stp.[step_uid]
		FROM [msdb].[dbo].[sysjobsteps] AS stp
		INNER JOIN [msdb].[dbo].[sysjobs] AS job
			ON (job.[job_id] = stp.[job_id]);